package com.food.chronicles.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.food.chronicles.entity.secondary.Recipes;
import com.food.chronicles.mapper.secondary.RecipesMapper;
import com.food.chronicles.service.IRecipesService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 牧之
 * @since 2025-06-14
 */
@Service
public class RecipesServiceImpl extends ServiceImpl<RecipesMapper, Recipes> implements IRecipesService {

    @Override
    public boolean updateSyncStatusWithTransaction(List<Recipes> entityList) {
        for (Recipes recipe : entityList) {
            recipe.setSyncFlag(1);
        }
        return this.updateBatchById(entityList);
    }

}
